export const nameLengthValidator = val => val?.length >= 2

export const phoneNumberValidator = val => /^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(val)

export const mailValidator = val => /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val)
